import QtQuick
import QtQuick3D

import MineCraftUtils

Model{
    id:root

    property alias type:geom.type
    property BlockMeta meta:MineCraftBlockLibrary.getBlock(type)
    geometry:MineCraftBlockGeometry{
        id:geom
    }

    materials:{
        if(meta)
        {
            if(meta.attribute & BlockMeta.Transparent)
            {
                return [MineCraftGlobal.materialAlpha]
            }
            else{
                return [MineCraftGlobal.materialBase]
            }
        }

        return []
    }

}
